load("@rules_python//python:defs.bzl", "py_library")
load("@pip_deps//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

py_library(
    name = "cli_aead",
    testonly = 1,
    srcs = [
        "cli_aead.py",
    ],
    data = [
        "//testing:aead_cli_java",
        "//testing/cc:aead_cli_cc",
        "//testing/go:aead_cli_go",
        "//testing/python:aead_cli_python",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
        "@tink_py//tink/aead",
    ],
)

py_test(
    name = "cli_aead_test",
    srcs = ["cli_aead_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_aead",
        requirement("absl-py"),
        "@tink_py//tink:tink_python",
        "@tink_py//tink/aead",
    ],
)

py_library(
    name = "cli_daead",
    testonly = 1,
    srcs = [
        "cli_daead.py",
    ],
    data = [
        "//testing:deterministic_aead_cli_java",
        "//testing/cc:deterministic_aead_cli_cc",
        "//testing/go:deterministic_aead_cli_go",
        "//testing/python:deterministic_aead_cli_python",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
        "@tink_py//tink/daead",
    ],
)

py_test(
    name = "cli_daead_test",
    srcs = ["cli_daead_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_daead",
        requirement("absl-py"),
        "@tink_py//tink:tink_python",
        "@tink_py//tink/daead",
    ],
)

py_library(
    name = "cli_hybrid",
    testonly = 1,
    srcs = [
        "cli_hybrid.py",
    ],
    data = [
        "//testing:hybrid_decrypt_cli_java",
        "//testing:hybrid_encrypt_cli_java",
        "//testing/cc:hybrid_decrypt_cli_cc",
        "//testing/cc:hybrid_encrypt_cli_cc",
        "//testing/go:hybrid_decrypt_cli_go",
        "//testing/go:hybrid_encrypt_cli_go",
        "//testing/python:hybrid_decrypt_cli_python",
        "//testing/python:hybrid_encrypt_cli_python",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
        "@tink_py//tink/hybrid",
    ],
)

py_test(
    name = "cli_hybrid_test",
    srcs = ["cli_hybrid_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_hybrid",
        requirement("absl-py"),
        "@tink_py//tink:tink_python",
        "@tink_py//tink/hybrid",
    ],
)

py_library(
    name = "cli_mac",
    testonly = 1,
    srcs = [
        "cli_mac.py",
    ],
    data = [
        "//testing:mac_cli_java",
        "//testing/cc:mac_cli_cc",
        "//testing/go:mac_cli_go",
        "//testing/python:mac_cli_python",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
        "@tink_py//tink/mac",
    ],
)

py_test(
    name = "cli_mac_test",
    srcs = ["cli_mac_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_mac",
        requirement("absl-py"),
        "@tink_py//tink:tink_python",
        "@tink_py//tink/mac",
    ],
)

py_library(
    name = "cli_signature",
    testonly = 1,
    srcs = [
        "cli_signature.py",
    ],
    data = [
        "//testing:public_key_sign_cli_java",
        "//testing:public_key_verify_cli_java",
        "//testing/cc:public_key_sign_cli_cc",
        "//testing/cc:public_key_verify_cli_cc",
        "//testing/go:public_key_sign_cli_go",
        "//testing/go:public_key_verify_cli_go",
        "//testing/python:public_key_sign_cli_python",
        "//testing/python:public_key_verify_cli_python",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
        "@tink_py//tink/mac",
    ],
)

py_test(
    name = "cli_signature_test",
    srcs = ["cli_signature_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_signature",
        requirement("absl-py"),
        "@tink_py//tink:tink_python",
        "@tink_py//tink/signature",
    ],
)

py_library(
    name = "cli_tinkey",
    testonly = 1,
    srcs = [
        "cli_tinkey.py",
    ],
    data = [
        "//tinkey",
    ],
    deps = [
        "@tink_py//tink:cleartext_keyset_handle",
        "@tink_py//tink:tink_python",
    ],
)

py_test(
    name = "cli_tinkey_test",
    srcs = ["cli_tinkey_test.py"],
    srcs_version = "PY3",
    deps = [
        ":cli_aead",
        ":cli_daead",
        ":cli_hybrid",
        ":cli_mac",
        ":cli_tinkey",
        requirement("absl-py"),
    ],
)
